<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="__PLUGIN_TMPL__/admin/public/plugin/layui/css/layui.css">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/vue/dist/vue.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="__PLUGIN_TMPL__/admin/public/plugin/layui/layui.js"></script>
    <script type="module">
        import Vue from 'vue';
        import Element from 'element-ui';
        import './element-variables.scss';

        Vue.use(Element)
    </script>
</head>
<body>
<div id="app1" style="padding: 20px; padding-bottom: 0;">
    <el-row>
        <el-button @click="add_dialog()" type="success">添加</el-button>
    </el-row>
</div>
</body>
<script>
    new Vue({
        el: '#app1',
        data: function () {
            return {}
        },
        methods: {
            add_dialog: function () {
                this.openDialog("添加分类", "{:cmf_plugin_url('yongtai://article_category/add_category')}")
            },
            openDialog: function (title, url, area = ['800px', 'calc(80% - 60px)'], offset = ["center"]) {
                let self = this;
                layui.use(['layer'], function () {
                    self.layer = layui.layer;
                    self.layer.open({
                        type: 2,
                        maxmin: true,
                        title: title,
                        offset: offset,
                        area: area,
                        content: url
                    });
                })

            }
        }
    })
</script>
</html>

<include file="admin/public/table" table_data="{$table_data}" table="table"/>